home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cenvid / dosver.bat < prev    next >
DOS Batch File  |  1995-04-07  |  851b  |  35 lines

  1. @echo off
  2. REM ********************************************************************
  3. REM *** DosVer - Get DOS Version Number                              ***
  4. REM *** wanted to test how to use BIOS interrupts with CEnvi         ***
  5. REM Jouni Miettunen * jon@stekt.oulu.fi * Oulu * Finland * Europe * 1993
  6. REM ********************************************************************
  7. @CEnviD %0.bat %1
  8. GOTO CENVI_EXIT
  9.  
  10. main(argc,argv)
  11. {
  12.    if ( argc != 1 )
  13.       Instructions();
  14.    else
  15.       get_dos_version()
  16. }
  17.  
  18. get_dos_version()
  19. {
  20.    regs.ah = 0x30;
  21.    interrupt(0x21,regs);   // get version number
  22.    if (regs.al==0) puts("DOS earlier that 2.0\n");
  23.    else printf("DOS %d.%d\n",regs.al,regs.ah);
  24. }
  25.  
  26. Instructions()
  27. {
  28.    puts("");
  29.    puts("dosver - Show DOS version");
  30.    puts("");
  31.    puts("Usage: dosver");
  32. }
  33.  
  34. :CENVI_EXIT
  35.